package thinkingJava.chapter09;

interface CanFight {
	void fight();
}
interface CanSwim {
	void swim();
}
interface CanFly {
	void fly();
}
interface CanClumb {
	void clumb();
}
class ActionCharacter {
	public void fight() {

	}
}
class Hero extends ActionCharacter implements CanFight,CanSwim,CanFly {

	public void fly() {
		System.out.println("fly....");
	}

	public void swim() {
		System.out.println("swim....");
	}

}
public class Adventure {
	public static void t(CanFight f) {
		f.fight();
	}
	public static void u(CanSwim s) {
		s.swim();
	}
	public static void f(CanFly cf) {
		cf.fly();
	}
	public static void x(ActionCharacter a) {
		a.fight();
	}
	public static void main(String[] args) {
		Hero h = new Hero();
		t(h);
		u(h);
		f(h);
		x(h);
	}
}
